package com.hedl.practice.diyJava.array.utils;

import java.util.Arrays;

public class ArraySort {
    public String OrdemInversa(int[] ns){
        for (int i = ns.length-1;i >= 0;i--){
            for (int j = ns.length-1-i;j > 0;j--){
                if (ns[j] > ns[j-1]){
                    int tmp = ns[j];
                    ns[j] = ns[j-1];
                    ns[j-1] = tmp;
                }
            }
        }
        return Arrays.toString(ns);
    }
}
